Tabling in Mercury: Design and Implementation
نویسندگان
چکیده
For any LP system, tabling can be quite handy in a variety of tasks, especially if it is efficiently implemented and fully integrated in the language. Implementing tabling in Mercury poses special challenges for several reasons. First, Mercury is both semantically and culturally quite different from Prolog. While decreeing that tabled predicates must not include cuts is acceptable in a Prolog system, it is not acceptable in Mercury, since if-then-elses and existential quantification have sound semantics for stratified programs and are used very frequently both by programmers and by the compiler. The Mercury implementation thus has no option but to handle interactions of tabling with Mercury’s language features safely. Second, the Mercury implementation is vastly different from the WAM, and many of the differences (e.g. the absence of a trail) have significant impact on the implementation of tabling. In this paper, we describe how we adapted the copying approach to tabling to implement tabling in Mercury.
منابع مشابه
Minimal Model Tabling in Mercury
Prolog systems such as XSB have proven that tabling can be quite helpful in a variety of tasks, especially if it is efficiently implemented and fully integrated in the language. Implementing tabling in Mercury poses special challenges for several reasons. First, Mercury is both semantically and culturally quite different from Prolog. While decreeing that tabled predicates must not include cuts ...
متن کاملCICLOPS 2005 Proceedings of the Fifth Colloquium on Implementation of Constraint and LOgic Programming Systems
For any LP system, tabling can be quite handy in a variety of tasks, especially if it is efficiently implemented and fully integrated in the language. Implementing tabling in Mercury poses special challenges for several reasons. First, Mercury is both semantically and culturally quite different from Prolog. While decreeing that tabled predicates must not include cuts is acceptable in a Prolog s...
متن کاملAn Efficient Implementation of Linear Tabling Based on Dynamic Reordering of Alternatives
Tabling is a technique of resolution that overcomes some limitations of traditional Prolog systems in dealing with recursion and redundant sub-computations. We can distinguish two main categories of tabling mechanisms: suspension-based tabling and linear tabling. In suspension-based tabling, a tabled evaluation can be seen as a sequence of sub-computations that suspend and later resume. Linear ...
متن کاملAn External Module for Implementing Linear Tabling in Prolog
In previous work [1], we have presented a proposal to combine the power of tabling with the Extended Andorra Model (EAM) in order to produce an execution model with advanced control strategies that guarantees termination, avoids looping, reduces the search space, and is less sensitive to goal ordering. To address the integration between tabling and the EAM, through the BEAM system [2], we have ...
متن کاملOn Improving the Efficiency and Robustness of Table Storage Mechanisms for Tabled Evaluation
Most of the recent proposals in tabling technology were designed as a means to improve some practical deficiencies of current tabling execution models that reduce their applicability in particular applications. The discussion we address in this paper was also motivated by practical deficiencies we encountered, in particular, on the table storage mechanisms used for tabling support. To improve s...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006